package svc

import (
	"vip-shop-hub/api/internal/config"
	"vip-shop-hub/viprpc/viprpcclient"

	"github.com/zeromicro/go-zero/zrpc"
)

type ServiceContext struct {
	Config config.Config
	VipRpc viprpcclient.Viprpc
}

func NewServiceContext(c config.Config) *ServiceContext {
	return &ServiceContext{
		Config: c,
		VipRpc: viprpcclient.NewViprpc(zrpc.MustNewClient(c.VipRpc)),
	}
}
